package day04;
/*
    SOC1
    请在控制台输出满足如下条件的五位数
    个位等于万位
    十位等于千位
    个位+十位+千位+万位=百位
 */
public class ForDemo6 {
    public static void main(String[] args){
        //SOC1
        int number;
        int units;
        int decade;
        int hundreds;
        int kilobit;
        int myriabit;

        for(number=10000;number<=99999;number++){
            units = number % 10;
            decade = (number/10)%10;
            hundreds = (number/100)%10;
            kilobit = (number/1000)%10;
            myriabit = (number/10000)%10;
            
            if(units==myriabit && decade==kilobit && units+decade+kilobit+myriabit==hundreds){
                System.out.println(number);
            }
        }





    }
}
